﻿$(document).ready(function() {
    JSUtility.url = '../Handler/DeptEmployeeHandler.ashx';
    $('#tt').tree({
        checkbox: true,
        url: JSUtility.url,
        onlyLeafCheck: true,
        onClick: function(node) {
            $(this).tree('toggle', node.target);
        }
    });
    $("#btnSubmit").click(getChecked);
});
function getChecked() {
    var nodes = $('#tt').tree('getChecked');
    var s = '';
    for (var i = 0; i < nodes.length; i++) {
        if (s != '') s += ',';
        s += nodes[i].text;
    }
    return s;
}